# coding=utf-8
from common import orm
from common.utils.types import Enum

CAMPAIGN_CONFIG = {
    'campaign_id': '',
    'condition_price': 300,
    'reward_price': 10,
}

CAMPAIGN_STATUS = Enum({
    'WAIT': (1L, u"等待领取"),
    'DONE': (2L, u"已领取")
})

CAMPAIGN_NAME = 'daily_recharge'


class DailyRecharge(orm.Model):
    """
    每日充值送彩金活动(例如: 单次充值满300送10彩金)
    """
    __tablename__ = 'daily_recharge_campaign'
    id = orm.Column(orm.BigInteger, primary_key=True)
    user_id = orm.Column(orm.Integer)
    date = orm.Column(orm.VARCHAR)
    price = orm.Column(orm.Integer)
    status = orm.Column(orm.Integer, default=1)
    campaign_id = orm.Column(orm.VARCHAR)
    extend = orm.Column(orm.TEXT)
    created_at = orm.Column(orm.DATETIME)
    updated_at = orm.Column(orm.DATETIME)
